﻿/**********************************************************************
 * @file   FITKAcousticsVTKGraphObjectToolDirection.h
 * @brief  工具方向渲染对象
 * @author BaGuijun (baguijun@163.com)
 * @date   2025-02-20
 *********************************************************************/
#ifndef FITKAcousticsVTKGraphObjectToolDirection_H
#define FITKAcousticsVTKGraphObjectToolDirection_H

#include "FITKAcousticsVTKGraphObjectToolBase.h"

class vtkArrowSource;
class vtkGlyph3D;
class vtkPoints;
class vtkDoubleArray;
class vtkPolyData;

namespace Exchange
{
    /**
     * @brief  工具方向渲染对象
     * @author BaGuijun (baguijun@163.com)
     * @date   2025-02-20
     */
    class FITKAcousticsVTKGraphObjectToolDirection :public FITKAcousticsVTKGraphObjectToolBase
    {
        Q_OBJECT;
        FITKGraphObjectRegist(FITKAcousticsVTKGraphObjectToolDirection, FITKAcousticsVTKGraphObjectToolBase);
        FITKCLASS(Exchange, FITKAcousticsVTKGraphObjectToolDirection);
    public:
        /**
         * @brief    构造函数
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        FITKAcousticsVTKGraphObjectToolDirection(Core::FITKAbstractDataObject* dataObj);
        /**
         * @brief    析构函数
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        virtual ~FITKAcousticsVTKGraphObjectToolDirection();
        /**
         * @brief    更新
         * @param[i] forceUpdate           是否强制刷新
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        virtual void update(bool forceUpdate) override;
    protected:
        /**
         * @brief    初始化
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        void init();
        /**
         * @brief    生成渲染数据
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        void generateData();
        /**
         * @brief    生成渲染对象
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        void generateGraph();
        /**
         * @brief    重置数据
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        void resetData();
        /**
         * @brief    获取方向
         * @param[i] direction                     方向[3]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        void getDirection(double* direction);
        /**
         * @brief    获取位置
         * @param[i] position                      位置[3]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-20
         */
        void getPosition(double* position);
    protected:
        /**
         * @brief  演员对象
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-01-13
         */
        FITKAcousticsVTKGraphActor* _graphActor = nullptr;
        /**
         * @brief  箭头几何数据
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-12-19
         */
        vtkArrowSource* _picData = nullptr;
        /**
         * @brief  图元
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-12-24
         */
        vtkGlyph3D* _glyph3D = nullptr;
        /**
         * @brief  箭头位置
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-12-24
         */
        vtkPoints* _points = nullptr;
        /**
         * @brief  箭头数据
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-12-24
         */
        vtkPolyData* _polydata = nullptr;
        /**
         * @brief  箭头方向
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-12-24
         */
        vtkDoubleArray* _directions = nullptr;
    };
}


#endif
